package vip.bblog.dynamic.datasource;

import com.zaxxer.hikari.HikariConfig;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.Map;

/**
 * @author An-Il
 */
@ConfigurationProperties(prefix = "spring.datasource.dynamic")
public class DynamicDataSourceProperty {

    /**
     * 默认以master为主数据源
     */
    private String primary = "master";

    private Map<String,HikariConfig> datasource;

    public String getPrimary() {
        return primary;
    }

    public void setPrimary(String primary) {
        this.primary = primary;
    }

    public Map<String, HikariConfig> getDatasource() {
        return datasource;
    }

    public void setDatasource(Map<String, HikariConfig> datasource) {
        this.datasource = datasource;
    }
}
